package web.fabrimind.tas.domain;

import java.util.List;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * 物料入库申请对象 material_inbound_apply
 *
 * @author ruoyi
 * @date 2025-03-30
 */
public class MaterialInboundApply extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 申请ID
     */
    private Long applyId;

    /**
     * 申请编号
     */
    @Excel(name = "申请编号")
    private String applyCode;

    /**
     * 申请类型（0:采购入库 1:生产入库 2:退货入库 3:其他）
     */
    @Excel(name = "申请类型", readConverterExp = "0=:采购入库,1=:生产入库,2=:退货入库,3=:其他")
    private String applyType;

    /**
     * 状态（0:待审核 1:已审核 2:已驳回 4:待提交）
     */
    @Excel(name = "状态", readConverterExp = "0=:待审核,1=:已审核,2=:已驳回,4=:待提交")
    private String status;

    /**
     * 仓库ID
     */
    // @Excel(name = "仓库ID")
    // private Long warehouseId;

    /**
     * 申请人ID
     */
    @Excel(name = "申请人ID")
    private Long applyUserId;

    /**
     * 申请时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /**
     * 审核人ID
     */
    @Excel(name = "审核人ID")
    private Long auditUserId;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    /**
     * 审核意见
     */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /**
     * 物料入库申请明细信息
     */
    private List<MaterialInboundApplyDetail> materialInboundApplyDetailList;


    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Long userId;

    /**
     * 供应商ID
     */
    @Excel(name = "供应商ID")
    private Long supplierId;


    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    private String userName;


    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    private String supplierName;

    /** 申请人名称 */
    @Excel(name = "申请人名称")
    private String applyUserName;

    /** 审核人名称 */
    @Excel(name = "审核人名称")
    private String auditUserName;

    public String getApplyUserName() {
        return applyUserName;
    }

    public void setApplyUserName(String applyUserName) {
        this.applyUserName = applyUserName;
    }

    public String getAuditUserName() {
        return auditUserName;
    }

    public void setAuditUserName(String auditUserName) {
        this.auditUserName = auditUserName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }
    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }



    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setApplyId(Long applyId) {
        this.applyId = applyId;
    }

    public Long getApplyId() {
        return applyId;
    }

    public void setApplyCode(String applyCode) {
        this.applyCode = applyCode;
    }

    public String getApplyCode() {
        return applyCode;
    }

    public void setApplyType(String applyType) {
        this.applyType = applyType;
    }

    public String getApplyType() {
        return applyType;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    // public void setWarehouseId(Long warehouseId) {
    //     this.warehouseId = warehouseId;
    // }

    // public Long getWarehouseId() {
    //     return warehouseId;
    // }

    public void setApplyUserId(Long applyUserId) {
        this.applyUserId = applyUserId;
    }

    public Long getApplyUserId() {
        return applyUserId;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public Date getApplyTime() {
        return applyTime;
    }

    public void setAuditUserId(Long auditUserId) {
        this.auditUserId = auditUserId;
    }

    public Long getAuditUserId() {
        return auditUserId;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditOpinion(String auditOpinion) {
        this.auditOpinion = auditOpinion;
    }

    public String getAuditOpinion() {
        return auditOpinion;
    }

    public List<MaterialInboundApplyDetail> getMaterialInboundApplyDetailList() {
        return materialInboundApplyDetailList;
    }

    public void setMaterialInboundApplyDetailList(List<MaterialInboundApplyDetail> materialInboundApplyDetailList) {
        this.materialInboundApplyDetailList = materialInboundApplyDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("applyId", getApplyId())
                .append("applyCode", getApplyCode())
                .append("applyType", getApplyType())
                .append("status", getStatus())
                // .append("warehouseId", getWarehouseId())
                .append("supplierId", getSupplierId())
                .append("applyUserId", getApplyUserId())
                .append("applyTime", getApplyTime())
                .append("auditUserId", getAuditUserId())
                .append("auditTime", getAuditTime())
                .append("auditOpinion", getAuditOpinion())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("supplierName", getSupplierName())
                .append("materialInboundApplyDetailList", getMaterialInboundApplyDetailList())
                .append("applyUserName", getApplyUserName())
                .append("auditUserName", getAuditUserName())
                .toString();
    }
}
